@extends('home.layout.index')
@section('link')
<link rel="stylesheet" href="/homeassets/homepage/meizu/css/layout-25702f0ee1.css" />
<link rel="stylesheet" href="/homeassets/homepage/meizu/css/detail-454fe98e90_1.css" />
@endsection
@section('content')
<div class="container">
                <section class="crumbs clearfix">
                            <a data-mtype="store_de_mbx_1" href="/">首页</a>&nbsp;&gt;&nbsp;
                            <a class="ellipsis crumbs-title">{{ $goodsbasis['goodsname'] }}</a>
                </section>
                <div id="myglass" style="width:375px;height:375px;position:absolute;z-index:10;left:600px;top:265px;display:none;overflow: hidden;">
                       <img src="" alt="" width="1125px" height="1125px">
                </div>
                <section class="row">
                    <div class="preview" id="preview">
                        <div class="preview-booth">
                            <a href="javascript:;" id="J_imgBooth">
                                <img src="{{ $goodsbasis['picture'] }}" height="375" width="375" alt="">
                            </a>
                        </div>
                        
                        <ul class="preview-thumb clearfix" id="J_previewThumb" style="padding:0">
                        	<li class="current"><a data-mtype="store_de_tp_1" javascript:; href="#"><img src="{{ $goodsbasis['picture'] }}" width="75" height="75"></a>
                        	</li>
                        	<li><a data-mtype="store_de_tp_2" javascript:; href="#"><img src="{{ $goodsdetail['image1'] }}" width="75" height="75"></a>
                        	</li>
                        	<li><a data-mtype="store_de_tp_3" javascript:; href="#"><img src="{{ $goodsdetail['image2'] }}" width="75" height="75"></a>
                        	</li>
                        	<li ><a data-mtype="store_de_tp_4" javascript:; href="#"><img src="{{ $goodsdetail['image3'] }}" width="75" height="75"></a>
                        	</li>
                        </ul>
                    </div>
                    <div class="property" id="property">
                            <div class="property-hd">
                                <h1>{{ $goodsbasis['goodsname'] }}</h1>

                                <p class="mod-info active">
                                	{{ $goodsdetail['title'] }}
                                </p>
                            </div>
                            <div class="property-sell">
                                <dl class="property-sell-price clearfix">
                                    <dt class="vm-metatit" id="J_discountTag">价<span class="s-space"></span><span class="s-space">格:</span>
                                    </dt>
                                    <dd>
                                        <div class="mod-price">
                                            <small>¥</small>
                                            <span id="J_price" class="vm-money">{{ $goodsbasis['price'] }}</span>
                                        </div>
                                        
                                    </dd>
                                </dl>
                            </div>
                             <div class="property-set">
                                    <dl class="property-set-sale" data-property="网络类型">
                                        <dt class="vm-metatit">销量:</dt>
                                        <dd class="clearfix">
                                                <a data-value="14:18238" data-mtype="store_de_sp_1_1" href="javascript:;"  title="" class="selected">
                                                        <span>{{ $goodsbasis['sales'] }}</span>
                                                </a>
                                        </dd>
                                         <dt class="vm-metatit">商品评分:</dt>
                                        <dd class="clearfix">
                                                <a data-value="14:18238" data-mtype="store_de_sp_1_1" href="javascript:;"  title="" class="selected">
                                                        <span>{{ $goodsbasis['evaulate'] }}</span>
                                                </a>
                                        </dd>

                                    </dl> 
                            </div>
                          
                            <div class="property-set">
                                 @foreach($attr as $attrv)
                                    <dl class="property-set-sale" data-property="网络类型">
                                        <dt class="vm-metatit">{{ $attrv[0] }}:</dt>
                                        <dd class="clearfix">
                                                <a data-value="14:18238" data-mtype="store_de_sp_1_1" href="javascript:;"  title="{{ $attrv[1] }}" class="selected">
                                                        <span>{{ $attrv[1] }}</span>
                                                </a>
                                        </dd>
                                    </dl> 
                                    @endforeach 
                            </div>
                           
                            <div class="property-service">
                                    <dl class="property-service-item clearfix">
                                        <dt class="vm-metatit">
                                        	<span class="s-space">支</span>
                                        	<span class="s-space">持:</span>
                                        </dt>
                                        <dd class="mod-bd" id="J_prodService">
                                            <span><i class="icon icon-service"></i>花呗分期</span>
                                        </dd>

                                       
                                    </dl>
                                   
                                    <dl class="property-service-provider clearfix">
                                        <dt class="vm-metatit">
                                        	<span class="s-space">服</span>
                                        	<span class="s-space">务:</span>
                                        </dt>
                                        <dd class="clearfix">
                                            <span id="J_installmentInfo">本商品由 {{  $goodsbasis['username']}} 负责发货并提供售后服务</span>
                                                
                                        </dd>
                                    </dl>
                            </div>
                            <div class="property-buy">
                                <p class="vm-message" id="J_message">
                                </p>
                                <dl class="property-buy-quantity">
                                    <dt class="vm-metatit">
                                    	<span class="s-space">数</span>
                                    	<span class="s-space">量:</span>
                                    </dt>
                                    <dd class="clearfix">
                                        <div class="mod-control">
                                            <a title="减少" href="javascript:;" class="vm-minus disabled">-</a>
                                            <input type="text" onkeyup="if(this.value.length==1){this.value=this.value.replace(/[^1-9]/g,'')}else if(this.value == ''){this.value=1}else{this.value=this.value.replace(/\D/g,'')} " onafterpaste="if(this.value.length==1){this.value=this.value.replace(/[^1-9]/g,'')}else{this.value=this.value.replace(/\D/g,'')} " value="1" id="J_quantity" data="{{ $gid }}">
                                            <a title="增加" href="javascript:;" class="vm-plus">+</a>
                                        </div>
                                        <div>
                                            <a id="J_btnBuy" class="btn btn-primary btn-lg " data-mtype="store_de_buy" href="javascript:void(0);"><i></i>立即购买</a>
                                            
                                            <a rel="nofollow" id="cart" style="height:38px;font-size:15px;line-height:38px" class="btn btn-line-primary btn-small" href="javascript:;" onclick="addcart()" target="_blank">
					                            <i class="iconfont">
					                                
					                            </i>
					                            加入购物车
					                        </a>
                                            <p class="vm-service" id="J_panicBuyingWrap"></p>
                                        </div>
                                    </dd>
                                </dl>
                            </div>
                    </div>
                </section>
            </div>

  <!-- 详情====================================================================== -->
<section class="row detail" id="detail">
    <div style="height:62px;">
        <div class="detail-tab" id="detailTabFixed">
            <div class="fixed-container" style="background:#fff;z-index:100">
                <ul class="clearfix" style="display: block;background:#fff;z-index:110">
                    <li class="current">
                        <a data-mtype="store_de_xq_1" href="javascript:;">商品详情</a>
                    </li>
                    <li class="">
                        <a data-mtype="store_de_xq_2" href="javascript:;">规格参数</a>
                    </li>
                    <li class="">
                        <a data-mtype="store_de_xq_3" href="javascript:;">商品评价</a>
                    </li>
                </ul>
            </div>
        </div>
    </div>
    <div class="detail-content container">
        <div class="introduce" id="introduce" style="display: block;">
               
                <img class="lazy" width="1240" alt="" src="{{ $goodsdetail['image1'] }}">
                <img class="lazy" width="1240" alt="" src="{{ $goodsdetail['image2'] }}">
                <img class="lazy" width="1240" alt="" src="{{ $goodsdetail['image3'] }}">
                <img class="lazy" width="1240" alt="" src="{{ $goodsdetail['image4'] }}">
                <img class="lazy" width="1240" alt="" src="{{ $goodsdetail['image5'] }}">
               
        </div>
        <div class="standard" id="standard" style="display: none;">
            <table class="standard-table">
                <tbody>
                    
                        <tr class="standard-table-group">
                            <th colspan="2">
                    
                                {{ $goodsdetail['details'] }}
                            </th>
                        </tr>
                            @foreach($attr as $av)
                            <tr>
                                <th>
                                {{ $av[0] }}
                                </th>
                                <td>
                                {{ $av[1] }}
                                </td>
                            </tr>
                            @endforeach
                </tbody>
            </table>
        </div>
            <div class="question current" id="question" style="display: none;">
                <div class="question-list">

                    @foreach($evaluate as $ev)
                        <dl class="mod-item">
                            <dt class="vm-question">
                            {{ $ev['content'] }}
                            </dt>
                            <dd class="vm-answer">
                                {{ $ev['writer'] }} 发表于 {{ date('Y-m-d h:i:s',$ev['ctime']) }} 评价{{ $ev['score'] }}分
                                <br/>
                                <ul>
                                    @foreach($to_es as $value)
                                    @if($ev['id'] == $value['pid'])
                                    <li>{{ $value['content'] }} <span style="color:orange">{{ $value['writer'] }}</span> </li>
                                    @endif
                                    @endforeach
                                    <li @if(session('homeusername')) @else class="hide" @endif><a href="javascript:;" style="color:skyblue" info="{{ $ev['id'] }}" onclick="reply(this)">回复TA</a></li>
                                </ul>
                                
                            </dd>
                        </dl>
                    @endforeach
                </div>
                
                
            </div>
    </div>
</section>
<div class="modal fade modal-hide  modal-alert in" id="J_modalAlerta" style="position:fixed;top:450px">
    <div class="modal-bd">
        <div class="text">
            <h3 id="J_alertMsg">请输入评论内容</h3>
        </div>
        <div class="text">
            <input type="text" style="width:100%;height:30px" id="toes">
        </div>
        <div class="actions">
            <button class="btn btn-gray" data-dismiss="modal" id="J_alertCancela">取消</button>
            <button class="btn btn-primary" data-dismiss="modal" id="J_alertOka">确定</button>
        </div>
        <a class="close" id="mmmclosea" data-dismiss="modal" href="javascript: void(0);" data-stat-id="9cce544f88fddc4d"><i class="iconfont">X</i></a>
    </div>
</div>
<input type="hidden" id="switch" value="{{ Session('alert') or '' }}">
@endsection
@section('js')
<script src="/homeassets/homepage/goodsjs/goodsdetail.js"></script>
@endsection